1. Field of the Invention
The present invention relates to a technique allowing communications between a computer and a network such as a switched telephone network.
2. Description of the Related Art
With the widespread use of personal computers (PCs), the demands for voice communication between personal computers through a telephone network are growing. Conventionally, voice data communication is performed using telephone terminal equipment connecting a personal computer to the telephone network. More specifically, the telephone terminal equipment is provided with a phase-locked loop circuit that is used to synchronize to a clock signal extracted from the telephone network.
It is necessary to synchronize all devices connected to the same communication line and therefore the USB (universal serial bus) interface is used to synchronize the clock of a PC to the clock signal extracted from the telephone network. However, the clock of a PC cannot be controlled from outside. Accordingly, it is difficult or almost impossible to establish synchronization of a PC.
When clock synchronization is not perfectly established, the clock of a PC that is used to digitize a voice signal and the transmission clock of the telephone network are independently running. In the case where the PC clock frequency is higher than the transmission clock frequency of the telephone network, the digital signal generated by the PC cannot be transmitted to the telephone network. Contrarily, when the PC clock frequency is lower than the transmission clock frequency of the telephone network, data to be transmitted to the telephone network is partly lost, which causes noise due to slips of voice data.
An object of the present invention is to provide a clock adjustment method and apparatus allowing stable and reliable voice communication between a computer and a network without generating noise due to slips of voice data.
According to an aspect of the present invention, an apparatus connecting a first network and a second network to transfer data between them, wherein the first and second networks operate at different clock frequencies, respectively, includes: a first interface to the first network; a second interface to the second network; a buffer memory connected to the first interface, for storing data to be transferred to one of the first and second networks; a clock converter connected between the buffer memory and the second interface, performing a clock conversion according to a controlled clock signal corresponding to the first network and an extracted clock signal that is extracted from the second network; a buffer monitor for monitoring an amount of data stored in the buffer memory to produce a buffer status signal; and a clock adjuster for adjusting the controlled clock signal depending on the buffer status signal.
The clock adjuster may change a frequency of the controlled clock signal so that the amount of data stored in the buffer memory is kept at a predetermined level. The clock adjuster may change a frequency of the controlled clock signal by an amount within a permissible frame clock error which may occur in the first interface.
According to another aspect of the present invention, an apparatus includes: a USB (universal serial bus) interface to a USB bus connected to the personal computer; a network interface to the switched telephone network; a transmission buffer memory for storing transmission digital voice data that the personal computer transmits; a reception buffer memory for storing reception digital voice data received from the switched telephone network via the network interface; a PCM modulator for modulating the transmission digital voice data to produce a transmission PCM signal; a PCM demodulator for demodulating a reception PCM signal to produce the reception digital voice data; a transmission clock converter connecting the PCM modulator to the network interface, performing a clock conversion according to a controlled clock signal corresponding to the USB interface and an extracted clock signal that is extracted from the second network; a reception clock converter connecting the network interface to the PCM demodulator, performing a clock conversion according to the controlled clock signal and the extracted clock signal; a buffer monitor for monitoring an amount of data stored in each of the transmission and reception buffer memories to produce a buffer status signal; and a clock switching controller for switching a frequency of the controlled clock signal to one selected from a plurality of predetermined frequencies depending on the buffer status signal.
The clock switching controller may switch a frequency of the controlled clock signal so that the amount of data stored in the buffer memory is kept at a predetermined level. The plurality of predetermined frequencies may be a normal frequency, a lower frequency, and a higher frequency, wherein a difference between each of the lower and higher frequencies and the normal frequency falls into a range within a permissible frame clock error which may occur in the USB interface. The permissible frame clock error may be 5% of a normal frame clock of the USB bus.
The transmission clock converter may include: a first coder for coding the transmission PCM signal to produce a transmission analog voice signal according to the controlled clock signal; and a first decoder for decoding the transmission analog voice signal to produce network-side transmission PCM signal according to the extracted clock signal. The reception clock converter may include: a second coder for coding network-side reception PCM signal to produce a network-side reception analog voice signal according to the extracted clock signal; and a second decoder for decoding the network-side reception analog voice signal to produce the reception PCM signal according to the controlled clock signal.
The digital voice data may be transferred through the USB bus in an isochronous mode.
The transmission buffer memory and the reception buffer memory may be FIFO (first-in-first-out) memories, respectively.
The transmission buffer memory may include a plurality of FIFO memories and the reception buffer memory comprises a plurality of FIFO memories.
A control method for a telephone terminal connecting a personal computer and a switched telephone network to transfer voice data between them, includes the steps of: storing digital voice data to be transferred to one of the personal computer and the switched telephone network in a buffer memory; monitoring an amount of data stored in the buffer memory to produce a buffer status signal; adjusting a frequency of a controlled clock signal corresponding to the personal computer depending on the buffer status signal; extracting an extracted clock signal from the switched telephone network; and converting an operation clock between the personal computer and the switched telephone network according to the controlled clock signal and the extracted clock signal.